package com.yuwubao.hz_International.entities.repository;

import com.yuwubao.hz_International.entities.AcountDetailEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * Created by yangyu on 2018/1/25.
 */
public interface AcountDetailRepository extends JpaRepository<AcountDetailEntity, Integer>, JpaSpecificationExecutor<AcountDetailEntity> {


//    @NotNull
//    @Query("select new com.yuwubao.hz_International.entities.vo.MoneyVo(case type when 0 then ade.money when 1 then ade.welfare when 2 then ade.bonouse else ade.gift end as money ,ade.createTime as time ,ade.name as name ) from AcountDetailEntity as ade where case when ?3='' then 1 else (ade.name like concat('%',?1,'%')) end and case " +
//            "when ?1='' then 1 else (ade.createTime>=?1) end and case when ?2='' then 1 else (ade.createTime<=?2) end order by ?#{#pageable} ")
//    Page<MoneyVo> getMoneyList(@NotNull String start, @NotNull String endtime, @NotNull String name, @NotNull Pageable pageable, int type);
}